import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/admin/community/getPostList',
    method: 'post',
    headers:
     {
       'Content-Type': 'application/json;charset=UTF-8'
     },
    data: query
  })
}

export function fetchCommentList(query) {
  return request({
    url: '/admin/community/GetPostCommentList',
    method: 'post',
    headers:
     {
       'Content-Type': 'application/json;charset=UTF-8'
     },
    data: query
  })
}

export function postStatus(query) {
  return request({
    url: '/admin/community/postStatus',
    method: 'post',
    headers:
     {
       'Content-Type': 'application/json;charset=UTF-8'
     },
    data: query
  })
}
// 获取评论及评论详情
export function postAndComments(query) {
  return request({
    url: 'admin/community/postAndComments',
    method: 'post',
    headers:
     {
       'Content-Type': 'application/json;charset=UTF-8'
     },
    data: query
  })
}

// 上下架帖子评论
export function postCommentStatus(query) {
  return request({
    url: 'admin/community/postCommentStatus',
    method: 'post',
    headers:
     {
       'Content-Type': 'application/json;charset=UTF-8'
     },
    data: query
  })
}

export function fetchUserList(query) {
  return request({
    url: '/admin/community/GetUserList',
    method: 'post',
    headers:
     {
       'Content-Type': 'application/json;charset=UTF-8'
     },
    data: query
  })
}

export function UserStatus(query) {
  return request({
    url: 'admin/community/UserStatus',
    method: 'post',
    headers:
     {
       'Content-Type': 'application/json;charset=UTF-8'
     },
    data: query
  })
}

export function fetchAwardList(query) {
  return request({
    url: '/admin/community/GetAwardList',
    method: 'post',
    headers:
     {
       'Content-Type': 'application/json;charset=UTF-8'
     },
    data: query
  })
}
